﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ControlReportPhanBoChiTieu.ascx.cs" Inherits="UserControl_ControlReportPhanBoChiTieu" %>
<%@ Register assembly="DevExpress.Web.ASPxEditors.v9.2, Version=9.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dxe" %>

<%@ Register assembly="DevExpress.Web.ASPxPivotGrid.v9.2, Version=9.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPivotGrid" tagprefix="dxwpg" %>
<%@ Register assembly="DevExpress.Web.ASPxPivotGrid.v9.2.Export, Version=9.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.XtraPivotGrid.Web" tagprefix="dxpgw" %>

<script type="text/javascript">
    function pageLoad() {

        $("#<%= imgBtnAdd.ClientID %>").click(function () {

            $.blockUI({
                message: '<h1>Xin vui lòng chờ xử lý</h1>',
                css: {
                    border: 'none',
                    padding: '15px',
                    backgroundColor: '#f00',
                    opacity: .5,
                    color: '#fff'
                }
            });

        });
        $("#<%= ImgBtnRefresh.ClientID %>").click(function () {

            $.blockUI({
                message: '<h1>Xin vui lòng chờ xử lý</h1>',
                css: {
                    border: 'none',
                    padding: '15px',
                    backgroundColor: '#f00',
                    opacity: .5,
                    color: '#fff'
                }
            });

        });
        $("#<%= imgBtnSave.ClientID %>").click(function () {
            $.blockUI({
                message: '<h1>Xin vui lòng chờ xử lý</h1>',
                css: {
                    border: 'none',
                    padding: '15px',
                    backgroundColor: '#f00',
                    opacity: .5,
                    color: '#fff'
                }
            });
            setTimeout($.unblockUI, 5000);
        });
        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
        function EndRequestHandler(sender, args) {
            $.unblockUI();
        }

    }

</script>


<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<Triggers>
<asp:PostBackTrigger ControlID="imgBtnSave" />
</Triggers>
    <ContentTemplate>
    
                <div class="direct_container_right_titletop direct_colleft">
                    Báo cáo phân bổ chỉ tiêu cho TDV 
                </div>
                
                <!-- Button chuc nang-->
                <div class="direct_menu_report_page direct_colleft">
                   
                     <asp:DropDownList ID="DropQuy" runat="server">
                    </asp:DropDownList>
                    <asp:ImageButton ID="imgBtnAdd" ToolTip="Lấy dữ liệu" onclick="imgBtnAdd_Click"  ImageUrl="~/Images/Document.png" Width="32px" Height="32px" runat="server" />
                    <asp:ImageButton ID="imgBtnSave" ToolTip="Xuất ra file excel"  onclick="imgBtnSave_Click" ImageUrl="~/Images/download.png" Width="32px" Height="32px" runat="server" />
                     <asp:ImageButton ID="ImgBtnRefresh" onclick="imgBtnRefresh_Click" CausesValidation="false" ToolTip="Reset lại dữ liệu" ImageUrl="~/Images/Refresh.png" Width="32px" Height="32px" runat="server" />
                    
                 </div>
                <!-- End Button chuc nang-->
                <div class="clear"></div>
                 <hr />

                
                   <table>
                   
                    <tr>
                    <td>
        <dxpgw:ASPxPivotGridExporter ID="ASPxPivotGridExporter1" ASPxPivotGridID="ASPxPivotGrid1" runat="server">
        </dxpgw:ASPxPivotGridExporter>
       <dxwpg:ASPxPivotGrid ID="ASPxPivotGrid1"  runat="server">
                                             <Fields>
                                                   
                                                    <dxwpg:PivotGridField ID="PivotGridField2" Area="RowArea"  AreaIndex="0" 
                                                     Caption="Quý" FieldName="Quy">
                                                    </dxwpg:PivotGridField>
                                                     <dxwpg:PivotGridField ID="PivotGridField3" Area="RowArea"  AreaIndex="2" 
                                                     Caption="Họ tên" FieldName="TDV">
                                                    </dxwpg:PivotGridField>
                                                     <dxwpg:PivotGridField ID="PivotGridField4" Area="RowArea"  AreaIndex="4" 
                                                     Caption="Mặt hàng" FieldName="itemkey">
                                                    </dxwpg:PivotGridField>             
                                                     <dxwpg:PivotGridField ID="PivotGridField9" Area="RowArea"  AreaIndex="5" 
                                                     Caption="Focus" FieldName="Focus">
                                                    </dxwpg:PivotGridField>               
                                                     <dxwpg:PivotGridField ID="PivotGridField5" Area="RowArea"  AreaIndex="6" 
                                                     Caption="Số lượng" FieldName="Qty">
                                                    </dxwpg:PivotGridField>
                                                    
                                                     <dxwpg:PivotGridField ID="PivotGridField1" Area="RowArea"  AreaIndex="8" 
                                                     Caption="Nhóm sản phẩm" FieldName="Channel">
                                                    </dxwpg:PivotGridField>
                                                     <dxwpg:PivotGridField ID="PivotGridField7" Area="RowArea"  AreaIndex="9" 
                                                     Caption="Gam hàng" FieldName="Group">
                                                    </dxwpg:PivotGridField>

                                                     <dxwpg:PivotGridField ID="PivotGridField8" Area="RowArea"  AreaIndex="10" 
                                                     Caption="Thuộc NPP" FieldName="sitename">
                                                    </dxwpg:PivotGridField>
                                                </Fields>
                                                <OptionsPager Visible="False">
                                                </OptionsPager>
                                               
                                                <OptionsView ShowColumnGrandTotals="False" ShowRowGrandTotals="False" ShowRowTotals="False" ShowColumnTotals="False" />
                                                </dxwpg:ASPxPivotGrid>
                
        
     </td>
                    </tr>
                 </table>
    </ContentTemplate>
</asp:UpdatePanel>